package com.cyz.web.app.async_method_invocation;

import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;

public interface AsyncExecutor {

    <T> AsyncResult<T> startProcess(Callable<T> callable);

    <T> AsyncResult<T> startProcess(Callable<T> callable, AsyncCallback<T> callback);

    <T> T endProcess(AsyncResult<T> result) throws ExecutionException, InterruptedException;

}
